// 引入二次封装请求
import requests from '@/utils/request'
// 获取品牌列表页
export const reqtrademarkList =(page,limit)=> requests({url:`/admin/product/baseTrademark/${page}/${limit}`,method:'get'})
// 修改|新增 
// {
//     "code": 0,
//     "data": {},
//     "message": "string",
//     "ok": true
//   }
export const AddOrUpdateTrademarkList=(trademark)=> {
    if(trademark.id){
        //如果有id 修改
        return requests({url:`/admin/product/baseTrademark/update`,method:'put',data:trademark})
    }else{
        //如果没有id 新增
        return requests({url:`/admin/product/baseTrademark/save`,method:'post',data:trademark})
    }
}
//删除
export const reqdeleteTrademark=(id)=>requests({url:`/admin/product/baseTrademark/remove/${id}`,method:'delete'})

